<template>
  <div>
    <el-form ref="form" :model="form" :rules="rules" label-width="1285px2px">
     <!-- 基本信息 -->
      <Basicinformation
        ref="Basicinformation"
        :basicInformationForm="form"
        :title="titles" :parentPlanName="Originalarray"
      ></Basicinformation>
      <!-- 处置原则和要求 -->
      <Disposalprinciplesandrequirements
        ref="Disposalprinciplesandrequirements"
        :basicInformationForm="form"
        :title="titles" :parentPlanName="Originalarray"
      >
      </Disposalprinciplesandrequirements>
      <!-- 救援小组 -->
      <rescueteam ref="rescueteam" :basicInformationForm="form"
      :title="titles" :parentPlanName="Originalarray"></rescueteam>
      <!-- 响应启动 -->
      <Responseinitiation
        ref="Responseinitiation"
        :basicInformationForm="form"
        :title="titles" :parentPlanName="Originalarray"
      ></Responseinitiation>
      <!-- 应急保障 -->
      <Emergencysupportoptions
        ref="Emergencysupportoptions"
        :basicInformationForm="form"
        :title="titles" :parentPlanName="Originalarray"
      ></Emergencysupportoptions>
      <!-- 处置措施 -->
      <disposalmeasures
        ref="disposalmeasures"
        :basicInformationForm="form"
        :title="titles" :parentPlanName="Originalarray"
      ></disposalmeasures>
      <!-- <el-row style="margin-top: 20px">
        <el-col :span="8">
          <el-form-item label="" prop="remark">
            <el-button type="primary" @click="submitForm">确 定</el-button>
            <el-button @click="cancel">取 消</el-button>
          </el-form-item>
          </el-col
        >
      </el-row> -->
    </el-form>
  </div>
</template>
<script>
// 这里可以导入其他文件（比如：组件，工具js，第三方插件js，json文件，图片文件等等）
// 例如：import 《组件名称》 from '《组件路径》';
import {
  getLists,
  insertData,
  deletelist,
  ModifierList,
} from "../../api/Genericmethods/GeneralQuery.js";
// 基本信息
import Basicinformation from "./components/Basicinformation.vue";
// 救援小组
import rescueteam from "./components/rescueteam.vue";
// 响应启动
import Responseinitiation from "./components/Responseinitiation.vue";
// 处置措施
import disposalmeasures from "./components/disposalmeasures.vue";
// 处置原则和要求
import Disposalprinciplesandrequirements from "./components/Disposalprinciplesandrequirements.vue";
// 应急保障
import Emergencysupportoptions from "./components/Emergencysupport.vue";
export default {
  // eslint-disable-next-line vue/no-unused-components
  components: {
    Basicinformation,
    rescueteam,
    Responseinitiation,
    disposalmeasures,
    Disposalprinciplesandrequirements,
    Emergencysupportoptions,
  },
  props: {},
  data() {
    return {
      form: {
        PlanName: "", //预案名称
        PlanType: "", //预案类型
        ApplicableScope: "", //适用范围
        ResponseLevel: "", //响应等级
        GradeName: "", //等级名称
      },
      rules: {},

      Originalarray: "",
         titles:""
    };
  },
  // 计算属性 类似于data概念
  computed: {},
  // 监控data中的数据变化
  watch: {},
  // 方法集合
  methods: {
    // 校验
    checkPlanNameUnique(rule, value, callback) {
      for (const item of this.$route.query.data) {
        if (value === item.PlanName) {
          this.$message.error("预案名称已存在");
        } else {
          callback();
        }
      }
    },
  },
  // 生命周期 - 创建完成（可以访问当前this实例）
  created() {
    this.form = { ...this.$route.query.row };
    this.Originalarray = this.$route.query.row;
    this.titles=this.$route.query.title
  },
  // 生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
  beforeCreate() {}, // 生命周期 - 创建之前
  beforeMount() {}, // 生命周期 - 挂载之前
  beforeUpdate() {}, // 生命周期 - 更新之前
  updated() {}, // 生命周期 - 更新之后
  beforeDestroy() {}, // 生命周期 - 销毁之前
  destroyed() {}, // 生命周期 - 销毁完成
  activated() {}, // 如果页面有keep-alive缓存功能，这个函数会触发
};
</script>
<style lang="scss" scoped></style>
